<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script>
        function People(name,speed){
            this.name=name;
        }
        People.prototype.showName=function(){
            console.log(this.name);

        }

        function Student(){

        }

        Student.prototype=new People("zhangsan");
        Student.prototype.study=function(){
            console.log("学习");
        }

        var stu=new Student();
        stu.study();
        stu.showName();

        // Student.prototype
        // console.dir(stu.__proto__===Student.prototype);
        // console.dir(Student.prototype.__proto__===People.prototype);
        // console.dir(stu.__proto__.__proto__===People.prototype);
        console.dir(People.prototype.__proto__.__proto__);//原型终止原生链
    </script>
</head>
<body>
    
</body>
</html>